package com.itheima.date;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Scanner;

public class DateDemo5 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个年份");
        int year = sc.nextInt();
        LocalDate date = LocalDate.of(year, 3, 1);
        LocalDate localDate = date.plusDays(-1);
        System.out.println(localDate);
        int dayOfMonth = localDate.getDayOfMonth();
        System.out.println(dayOfMonth);
    }
}
